<?php


namespace app\common\validates;


use think\Validate;

class Anniversary extends Validate
{
    protected $rule =   [
        'title|纪念日标题'   => 'require|min:2|max:200',
        'date|纪念日日期'    => 'require|dateFormat:Y-m-d',
        'bg_img|纪念日背景图' => 'url',
    ];

    protected $scene = [
        'store' => ['title', 'date', 'bg_img'],
        'update' => ['title', 'date', 'bg_img']
    ];
}
